
/** 
 *  @file
 *  @brief   PBARL 梁标准截面属性使用解析公式计算类工厂
 *  @author  duweixing
 *  @date    2024.03.27
 *  @version v1.0
 *  @par Copyright(c):  ShenGong  Simulation corporation
 */

#include "../Interface/BarSectionFormulaCalculatorFactory.h"
#include <iostream>
#include <assert.h>
#include "../../Common/BeamSecPropCalculatorInfo.h"
#include "RodSectionFormulaCalculator.h"
#include "BarSectionFormulaCalculator.h"
#include "TubeSectionFormulaCalculator.h"
#include "Tube2SectionFormulaCalculator.h"
#include "BoxSectionFormulaCalculator.h"
#include "Box1SectionFormulaCalculator.h"
#include "ISectionFormulaCalculator.h"
#include "I1SectionFormulaCalculator.h"
#include "HSectionFormulaCalculator.h"
#include "ChanSectionFormulaCalculator.h"
#include "Chan1SectionFormulaCalculator.h"
#include "Chan2SectionFormulaCalculator.h"
#include "TSectionFormulaCalculator.h"
#include "T1SectionFormulaCalculator.h"
#include "T2SectionFormulaCalculator.h"
#include "CrossSectionFormulaCalculator.h"
#include "ZSectionFormulaCalculator.h"
#include "HexaSectionFormulaCalculator.h"
#include "HatSectionFormulaCalculator.h"
#include "Hat1SectionFormulaCalculator.h"

using SG::DataStructure::FEM::BeamSectionStandardTypes;
using namespace SG::FEMSolver::Element;

BarSectionFormulaCalculatorSP BarSectionFormulaCalculatorFactory::Create (BeamSectionStandardTypes type)
{
    switch (type)
    {
        case BeamSectionStandardTypes::BEAMSECTYPE_ROD:
        {
            return std::make_shared<RodSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_BAR:
        {
            return std::make_shared<BarSectionFormulaCalculator> ();
            break;
        }
         case BeamSectionStandardTypes::BEAMSECTYPE_TUBE:
        {
            return std::make_shared<TubeSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_TUBE2:
        {
            return std::make_shared<Tube2SectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_BOX:
        {
            return std::make_shared<BoxSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_BOX1:
        {
            return std::make_shared<Box1SectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_I:
        {
            return std::make_shared<ISectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_I1:
        {
            return std::make_shared<I1SectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_H:
        {
            return std::make_shared<HSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_CHAN:
        {
            return std::make_shared<ChanSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_CHAN1:
        {
            return std::make_shared<Chan1SectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_CHAN2:
        {
            return std::make_shared<Chan2SectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_T:
        {
            return std::make_shared<TSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_T1:
        {
            return std::make_shared<T1SectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_T2:
        {
            return std::make_shared<T2SectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_CROSS:
        {
            return std::make_shared<CrossSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_Z:
        {
            return std::make_shared<ZSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_HEXA:
        {
            return std::make_shared<HexaSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_HAT:
        {
            return std::make_shared<HatSectionFormulaCalculator> ();
            break;
        }
        case BeamSectionStandardTypes::BEAMSECTYPE_HAT1:
        {
            return std::make_shared<Hat1SectionFormulaCalculator> ();
            break;
        }
        default:
            break;
    }

    std::cout << NOT_SUPPORT_SECTOIN_TYPE << static_cast<int> (type) << " \n";
    assert (0);
    return nullptr;
}